package com.zfast.yugioh.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zfast.forge.common.BaseService;
import com.zfast.forge.common.Page;
import com.zfast.yugioh.mapper.TestMapper;
import com.zfast.yugioh.model.Test;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 测试表
 *
 * @author zgn
 * @email
 * @date 2022-06-01 15:51:47
 */
@Service("testService")
public class TestService extends BaseService<Integer, Test> {
    public TestService(TestMapper mapper) {
        super(mapper);
    }

    @Resource
    TestMapper testMapper;

    public PageInfo<Test> pageList(Test test, Integer num, Integer size) {
        PageHelper.startPage(num, size);
        List<Test> list = testMapper.selectLikeTest(test);
        PageInfo<Test> pageInfo = new PageInfo(list);
        return pageInfo;
    }
}

